package com.lwj.model;

import com.lwj.utils.DateUtils;

import java.util.Date;

public class AuditModel {
    private String creator;
    private String createTime;
    private String updateBy;
    private String updateTime;
    private String dr;

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public void setDr(String dr) {
        this.dr = dr;
    }

    public void initCreate(String empId){
        this.creator=empId;
        this.updateBy=empId;
        this.createTime= DateUtils.DateToString(new Date(),DateUtils.DATE_TO_STRING_DETAIAL_PATTERN);
        this.updateTime=this.createTime;
        this.dr="0";
    }
    public void initUpdate(String empId){
        this.updateTime=DateUtils.DateToString(new Date(),DateUtils.DATE_TO_STRING_DETAIAL_PATTERN);
        this.updateBy=empId;
    }
}
